<extend name="Common:base" />
<block name="head"></block>
<block name="body">
    <div id="app" class="container">
        <div class="wrapp" v-show="show" style="display: none">
            <!-- seach form -->
            <el-row>
                <el-col :span="12">
                    <el-form :inline="true"  ref="searchForm" :model="searchForm">
                      <el-form-item prop="name" >
                        <el-input   placeholder="请输入姓名|qq|手机号"  v-model="searchForm.name">
                        </el-input>
                      </el-form-item>
                      <el-form-item>
                        <el-button type="primary" icon="search" @click="loadDatalist" >查询</el-button> 
                        <el-button icon="close" @click="searchReset">重置</el-button>
                        <!-- <el-button  @click="openDialog('advancedSearch')" icon="search">高级查询</el-button>  -->
                      </el-form-item>
                    </el-form>
                </el-col>
                <el-col :span="12">
                </el-col>   
            </el-row>
            <!-- / search form -->

            <!-- datatables  -->
            <el-row>
                <el-col :span="24">
                  <el-table 
                    :data="dataList" 
                    border  
                    v-loading="dataLoad" 
                    element-loading-text="{:L('DATA_LOGIN')}">
                        <el-table-column type="selection"  width="50" >
                        </el-table-column>
                        <el-table-column   label="{:L('INDEX')}"  :formatter="handleIndex" width="65"  >
                        </el-table-column>
                        <el-table-column prop="name"  label="客户姓名" width="140" align="center">
                        </el-table-column>
                        
                        <el-table-column prop="phone" label="手机" align="center" width="140">
                        </el-table-column>
                          <el-table-column prop="qq" label="QQ号" align="center" width="160">
                        </el-table-column>
                        <el-table-column prop="help_user" label="创建人" align="center" width="135">
                        </el-table-column>
                        <el-table-column prop="help_transfer" label="管理人" align="center" width="135">
                        </el-table-column>

                        <el-table-column prop="help_group_id" label="小组" align="center" width="135">
                            <template scope="scope">
                              {{ getGroup(scope.row.help_group_id) }}
                            </template>
                        </el-table-column>
                        

                      
                        <el-table-column inline-template :context="_self"  fixed="right"  align="center" label="操作" width="160">
                          <span>
                            <el-button @click="handleDelete($index, row)"  size="small" type="danger">删除</el-button>
                          </span>
                        </el-table-column>
                    </el-table>
                </el-col>
            </el-row>
            <!-- / datatables  -->
            

            <!-- toolbar -->
            <el-row type="type"  justify="space-between" align="middle"  class="row-bg">
              <el-col :span="12">
              <div class="grid-content bg-purple">
               
              </div>
              </el-col>
              <el-col :span="12">
                  <div class="grid-content bg-purple-light pull-right">
                    <!-- page -->
                    <include file="Common:_pagination" />
                    <!-- / page -->
                  </div>
              </el-col>
            </el-row>
            <!-- / toolbar -->
        </div>
    </div>
</block>
<block name="scripts">
<script>
    window.defaultOption.setDatas({
        groups:{:json_encode($groups)}
    }).setForm('search', {
        name:"",
    }).setMethod('getGroup', function(v){
        return this.groups[v];
    });
</script>

    
</block>